package bar.dark.lee.setting;

import bar.dark.lee.R;
import bar.dark.lee.SuperActivity;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.TextView;

public class DeveloperActivity extends SuperActivity
{
	private View email1View;
	private View email2View;
	
	private TextView email1;
	private TextView email2;
	
	@Override
	protected void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		
		setContentView(R.layout.developer_activity);
		
		setTitle("개발자");
		
		email1View = findViewById(R.id.developerEmail1View);
		email2View = findViewById(R.id.developerEmail2View);
		email1 = (TextView) findViewById(R.id.developerEmail1);
		email2 = (TextView) findViewById(R.id.developerEmail2);
		
		email1View.setOnClickListener(new OnClickListener()
		{
			@Override
			public void onClick(View v)
			{
				Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
				emailIntent.setType("plain/text");
				emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{email1.getText().toString()});
//				emailIntent.putExtra(Intent.EXTRA_SUBJECT, "");   
		
				startActivity(Intent.createChooser(emailIntent, "Send mail..."));
			}
		});
		
		email2View.setOnClickListener(new OnClickListener()
		{
			@Override
			public void onClick(View v)
			{
				Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
				emailIntent.setType("plain/text");
				emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{email2.getText().toString()});
//				emailIntent.putExtra(Intent.EXTRA_SUBJECT, "");   
				
				startActivity(Intent.createChooser(emailIntent, "Send mail..."));
			}
		});
	}

	@Override
	protected void tipButton()
	{
		Intent intent = new Intent(this, TipInfoActivity.class);
		intent.putExtra(TipsActivity.TIP_REQUEST_KEY, TipsActivity.TIP_DEVELOPER);
		startActivity(intent);
	}
}
